home *** CD-ROM | disk | FTP | other *** search
- Path: news.enterprise.net!usenet
- From: binlid@enterprise.net (Andrew Hindley)
- Newsgroups: comp.lang.c
- Subject: Re: Can a function return a array of pointers? a.s.a.p.
- Date: Sun, 21 Apr 1996 13:33:28 GMT
- Organization: Enterprise PLC - Internet Services
- Message-ID: <4lde0r$s5r@news.enterprise.net>
- References: <4lalvn$536@badger.wmin.ac.uk>
- NNTP-Posting-Host: ppp130.enterprise.net
- X-Newsreader: Forte Free Agent 1.0.82
-
- Idoia Lertxundi <gsoec@wmin.ac.uk> wrote:
-
- >My question is Can a function return a array of pointers?
-
- >It seems that the compiler does not like the following:
-
- >static char[] *ReadCodes(FILE *fptr, char *codes_array_p[MAX_CODES], char
- >*codes[MAX_CODES])
-
- >even [MAX_CODES] gives an error, therefore how can I represent a function
- >returning a type array of pointers?
-
- >Answers to the group and me.
-
- >gsoec@wmin.ac.uk
- >http://www.wmin.ac.uk/~gsoec/
-
- I am pretty certain you can't. What I would do is to pass the address
- of the array of pointers and let the function work directly on it.
-
-